/**
 * Created by Ji.wenjiang on 2016/8/30.
 */


angular.module('inspinia')
  .controller('userList', function ($scope,users, $state, toaster, fileReader, _undefined, myToaster, values) {
    init();
    function init() {
      $scope.search={};
      if (localStorage.getItem('regObj')) {
        $scope.patientList = JSON.parse(localStorage.getItem('regObj'));
        $.each(users, function (i, val) {
          $scope.patientList.push(val);
        })
        $scope.persons = $scope.patientList;
        setTimeout(function () {
          $('#mainTable').trigger('footable_redraw');
        }, 100)
      } else {
        $scope.persons = [];
        $.each(users, function (i, val) {
          $scope.persons.push(val);
        })
        setTimeout(function () {
          $('#mainTable').trigger('footable_redraw');
        }, 100)
      }
    }
  })
